package com.wlyuan.open.scanner.utils.enums.transport;

import com.wlyuan.core.marker.NamedValue;
import com.wlyuan.core.marker.NamedValueMap;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Map;

/**
 * @author lijing
 * @description 评分标签
 */
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
@Getter
public enum TransportScoreLabelEnum implements NamedValue<String> {

    DIRTY_CARGO("货物脏污", 100, "货物脏污"),
    PACKAGING_DAMAGED("包装破损", 101, "包装破损"),
    DIRTY_PACKAGING("包装脏污", 102, "包装脏污"),
    MISSING_PARTS("缺件", 103, "缺件"),
    LOST_PIECES("丢件", 104, "丢件"),

    DELIVERY_IS_NOT_ON_TIME("送货不准时", 200, "送货不准时"),
    NOT_DELIVERY_TIME_IN_ADVANCE("没有提前预约送货时间", 201, "没有提前预约送货时间");


    private final String value;
    private final Integer newValue;
    private final String name;

    private static final Map<String, TransportScoreLabelEnum> MAP = new NamedValueMap<>(TransportScoreLabelEnum.class);

    public static TransportScoreLabelEnum fromValue(String value) {
        return MAP.get(value);
    }
}
